//
//  WSUser.h
//  CharonTVProject
//
//  Created by karong on 2023/6/16.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface WSUser : NSObject
///用戶ID
@property (nonatomic, assign) NSInteger id;
///用戶暱稱
@property (nonatomic, strong) NSString * user_name;
///用戶綁定的三方賬號"email,"逗号分割
@property (nonatomic, strong) NSString * bind_third_info;
///用戶賬號
@property (nonatomic, strong) NSString * google_account;
///token令牌
@property (nonatomic, strong) NSString * token;
///簽名
@property (nonatomic, strong) NSString * sign;
///生日
@property (nonatomic, strong) NSString * birthday;
///頭像
@property (nonatomic, strong) NSString * avatar;
///性別 1-男 2-女
@property (nonatomic, assign) NSInteger sex;
///可用金币數量
@property (nonatomic, assign) NSInteger coins;
///是否锁定 0-正常，1-锁定, 2-注销
@property (nonatomic, assign) NSInteger status;
///會員狀態 0-不是會員 1-會員 2-會員已过期
@property (nonatomic, assign) NSInteger vip_status;
///會員过期時間戳
@property (nonatomic, assign) NSTimeInterval vip_expires_time;
///會員过期時間字符串
@property (nonatomic, strong) NSString * vip_expires_text;
///一个月會員費用
@property (nonatomic, assign) CGFloat vip_month_amount;
///會員注册天數
@property (nonatomic, assign) NSInteger reg_days;
///書架數
@property (nonatomic, assign) NSInteger user_bookshelf_total;
///阅读數
@property (nonatomic, assign) NSInteger user_read_total;
///评论數
@property (nonatomic, assign) NSInteger user_comment_total;
///是否作者 0-不是 1-是
@property (nonatomic, assign) BOOL is_author;
///是否首次注册 0-不是 1-是
@property (nonatomic, assign) BOOL is_new;

@end

@interface WSUserCenter : WSUser

+ (instancetype)defaultSession;

@property (nonatomic, strong) NSString * qtoken;
@property (nonatomic, assign, readonly, getter=isLogin) BOOL login;

+(NSString *)uuid;

- (void)logIn:(WSUserCenter *)userCenter;
- (void)logOut;
- (void)save;

- (void)getUserInfocharonTV_Request;
@end
NS_ASSUME_NONNULL_END
